﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;


namespace Portal.Nhibernate.Repository
{
    public class ProductRepository : Repository<IProduct>, IProductRepository<IProduct>
    {
        #region Overrides of Repository<IProduct>

        public override IProduct CreateEntity()
        {
            return new Product();
        }
        public override long Count()
        {

            return Session.CreateQuery(@"select count(*) from Product as s").UniqueResult<long>();
        }

        public JqEasyuiDataGrid<IProduct> JqEasyuiDataGrid(string code, string name, string categoryId, string sort = "CreateTime", string order = "Desc", int page = 10, int index = 1)
        {


            return new JqEasyuiDataGrid<IProduct>();
        }

        #endregion
    }
}
